package com.xhsj.user.sms.purchase.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xhsj.user.sms.purchase.entity.TbPurchaseOrderSubtask;
import com.xhsj.user.sms.purchase.vo.MyFindOrderSuntaskListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 采购订单子任务 Mapper 接口
 * </p>
 *
 * @author suxiaolin
 * @since 2020-06-08
 */
@Mapper
public interface TbPurchaseOrderSubtaskMapper extends BaseMapper<TbPurchaseOrderSubtask> {

    //获取最新的订单任务子任务编号
    String getOrderSubtaskNewNum(@Param("kinds") String kinds);

    //通过id获取采购订单任务子任务
    TbPurchaseOrderSubtask getPurchaseOrderSubtaskById(@Param("id") String id);


    void delById(@Param("id") String id);

    IPage<MyFindOrderSuntaskListVo> myFindOrderSuntaskList(@Param("page") IPage<TbPurchaseOrderSubtask> page,
                                                           @Param("userId") Object userId,
                                                           @Param("subtaskNumber") Object subtaskNumber,
                                                           @Param("supplierName") Object supplierName,
                                                           @Param("purchaseCycle") Object purchaseCycle);


    int updateByOrderId(@Param("userId") Integer userId, @Param("dataId") String dataId);
}
